In [3]:
%matplotlib inline
In [10]:
import os
os.chdir('/Users/albert/ndreg')
In [11]:
from ndreg import *
import matplotlib
import ndio.remote.neurodata as neurodata
import nibabel as nb
In [13]:
inImg = imgRead("../atlasfull.nii")
imgShow(inImg, vmax=500)
In [15]:
print(inImg.GetSpacing())
In [16]:
inImg = imgResample(inImg, spacing=(1.8719999119639397, .04999999888241291, 1.8719999119639397))
imgShow(inImg, vmax=500)
In [21]:
imgWrite(inImg, "../seelviz/miniatlas.nii")
In [22]:
inImg = imgRead("../seelviz/miniatlas.nii")
imgShow(inImg, vmax=500)
In [28]:
inImg = imgResample(inImg, spacing=(3.6719999119639397, .16999999888241291, 3.6719999119639397))
imgShow(inImg, vmax=500)
In [29]:
imgWrite(inImg, "../seelviz/miniatlas.nii")
In [27]:
inImg = imgRead("../seelviz/miniatlas.nii")
imgShow(inImg, vmax=500)
In [31]:
inImg = imgResample(inImg, spacing=(1.8719999119639397, .04999999888241291, 1.8719999119639397))
imgShow(inImg, vmax=500)
As shown above, a huge limitation to downsampling is a loss of data such that reconversions to a higher quality are not advised.